import { GetRequest } from '@/utils/request'
import type { Response } from '@/utils/request'
import netconfig from '@/config/netconfig'

/**
 * 通过vib获取家电类别相关信息
 */
export type SimpleDeviceModel = {
  brand: string
  enumber?: string
  fd?: string
  haId: string
  name: string
  picture?: string
  type: string
  vib: string
  zn?: string
}

export function getSimpleApplianceList(): Promise<Response<SimpleDeviceModel[] | null>> {
  return GetRequest('/api/HA/homeappliances/simple', {
    hasShowAll: netconfig.isTester,
  })
}
